﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using DTO;
using DAO;
namespace BUS
{
    public class DatChoBUS
    {
        public static List<DatChoDTO> SelectAllDatCho()
        {
            return DatChoDAO.SelectALLDatCho();
        }
        public static List<DatChoDTO> SelectALLDatChobyKhachHang(String maKH)
        {
            return DAO.DatChoDAO.SelectALLDatChobyKhachHang(maKH);
        }
        public static bool ThemDatCho(String makhachhang, DateTime ngaydi, String machuyen, String sohieu, Int32 soluong)
        {
            return DatChoDAO.ThemDatCho(makhachhang, ngaydi, machuyen, sohieu, soluong);
        }
        public static bool SuaDatCho(String makhachhang, DateTime ngaydi, String machuyen, String sohieu, Int32 soluong)
        {
            return DatChoDAO.SuaDatCho(makhachhang, ngaydi, machuyen, sohieu, soluong);
        }
        public static bool XoaDatCho(String makhachhang, DateTime ngaydi, String machuyen, String sohieu, Int32 soluong)
        {
            return DatChoDAO.XoaDatCho(makhachhang, ngaydi, machuyen, sohieu, soluong);
        }
        #region Tang/Giam Hang Hoa
        public static void thayDoiHangHoa(String maKH, String maChuyen, String ngayDi, int khoiLuong, String soHieu)
        {
            DAO.DatChoDAO.thayDoiHangHoa(maKH, maChuyen, ngayDi, khoiLuong, soHieu);
        }
        #endregion
        #region select dat cho by primary key
        public static DatChoDTO SelectDatChobyPrimaryKey(String maKH, String maChuyen, String ngayDi, String soHieu)
        {
            return DAO.DatChoDAO.SelectDatChobyPrimaryKey(maKH, maChuyen, ngayDi, soHieu);
        }
        #endregion
    }
}
